{include file="common/_header"}

<body>

<div class="x-body layui-anim layui-anim-up">
    <form class="layui-form">
        <input type="hidden" name="purchase_id" value="{$data.purchase_id}">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">快递单号</label>
                <div class="layui-input-inline">
                    <input type="text" name="tracking_number" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <div style="margin-top: 50px; margin-right: 50px;text-align: center;">
            <button type="button" lay-submit lay-filter="add" class="layui-btn">立即提交</button>
        </div>
    </form>
</div>
</body>
<script>
    layui.use('form', function(){
        var form = layui.form;

        form.on('submit(add)', function (data) {
            $.ajax({
                'url': '',
                'type': 'post',
                'data': data.field,
                'dataType': 'json',
                success: function (data) {
                    if(data.code == 1){
                        layer.msg(data.msg, {
                            icon: 6,
                            time: 400,
                        },function () {
                            window.parent.location.reload();
                        })
                    } else {
                        layer.msg(data.msg, {
                            icon: 5,
                            time: 400,
                        })
                    }
                }
            });
        })
    });

</script>



{include file="common/_bottom"}